<%@ page import="cn.myschool.entity.Grade" %>
<%@ page import="cn.myschool.entity.Subject" %>
<%@ page import="cn.myschool.severs.SubjectServer" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.myschool.severs.GradeServer" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/7/1
  Time: 16:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%!
    List<Grade> list = GradeServer.ME.findAll();
%>
<html>
<head>
    <title>添加课程</title>
</head>
<body>
<form action="dosub.jsp" method="post">
    名称: <input type="text" name="name" />
    学时: <input type="number" name="time" />
    年级: <select name="gradeId" >
    <%
        for (Grade grade :list ) {
     %>
           <option value="<%=grade.getId()%>"><%=grade.getGname()%></option>
    <%
        }
    %>
</select>
    <button type="submit" value="Submit">确认</button>
    <button type="reset" value="Reset">重来</button>
</form>
</body>
</html>
